package com.lagou.rocket.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class PageController {

    @RequestMapping("/page/success/{orderNo}")
    public String showPage(Model model,
                           @PathVariable("orderNo") String orderNo) {
        model.addAttribute("orderNo", orderNo);
        return "success";
    }

    @RequestMapping("/page/pay_success/{orderNo}")
    public String showPayPage(
            @PathVariable("orderNo") String orderNo,
            Model model
    ) {
        model.addAttribute("orderNo", orderNo);
        return "pay_success";
    }

}
